import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import BaseNav from '@/component/routerLearn/BaseNav';
import BaseSwitch from '@/component/routerLearn/BaseSwitch';

function RouterLearn(props) {
  const { match } = props;
  const BASE_ROUTERLEARN = match.path;
  console.log('RouterLearn 学习', props);

  return (
    <div className='my__component__wrapper'>
      <h2>Router 基础学习</h2>
      <BrowserRouter>
        <BaseNav baseUrl={BASE_ROUTERLEARN} />

        <BaseSwitch baseUrl={BASE_ROUTERLEARN} />
      </BrowserRouter>
    </div>
  );
}

export default RouterLearn;
